<template>
    <div class="active_add">
        <div class="title">
            <el-input v-model="newsList.articleTitle" placeholder="请输入文章标题"></el-input>
            <button>新增栏目</button>
        </div>
        <div class="titles">
            <template>
                <el-select v-model="newsList.columnName" placeholder="请选择">
                    <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                    </el-option>
                </el-select>
            </template>
        </div>
        <EditorBar v-model="newsList.articleContent" :isClear="isClear" class="EditorBar"></EditorBar>
        <div class="send-info">
            <button @click="sendinfo">发送</button>
        </div>
    </div>
</template>

<script>

import EditorBar from '../../component/wangEnduit/index'
export default {
    name : 'active_add',
    components : {
        EditorBar
    },
    data () {
        return {
            title : '',
            info : '',
            isClear : false,
            options: [{
                value: '1',
                label: '黄金糕'
            }],
            newsList : {
                acticleName: "",
                articleContent: "",
                articleTitle: "",
                authorName: "",
                columnName: "",
                createBy: 0,
                createTime: "",
                id: 0,
                parentId: 0,
                type: "",
                updateBy: 0,
                updateTime : ""
            }
        }
    },
    methods : {
        sendinfo (){
            let url = '/articleInfoRouter/addArticleInfo';
            let params = this.newsList;
            this.$axios.post(url,params).then(res=>{
                console.log(res);
            })
        }
    },
    mounted () {
      
    }
}
</script>

<style scoped>
    .active_add {
        width: 100%;
    }
    .title {
        display: flex;
        align-items: center;
    }
    .titles {
        margin-bottom: 20px;
    }
</style>

<style>
    .active_add .text {
        width: 89vw;
    }
    .active_add .send-info {
        width: 100%;
        text-align: center;
    }
    .active_add button {
        width: 50px;
        height: 30px;
        border-radius: 5px;
        margin-top: 50px;
        cursor: pointer;
    }
</style>

<style>
.active_add .el-input__inner {
    width: 200px;
}
</style>